/*
 * DNFToLPB.hpp
 *
 * Copyright 2012 Fabian Wenzelmann
 *
 * This file is part of Recognition-Procedures-for-Boolean-Functions.
 *
 * Recognition-Procedures-for-Boolean-Functions is free software: you
 * can redistribute it and/or modify it under the terms of the
 * GNU General Public License as published by the Free Software Foundation,
 * either version 3 of the License, or (at your option) any later version.
 *
 * Recognition-Procedures-for-Boolean-Functions is distributed in the hope
 * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
 * Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Recognition-Procedures-for-Boolean-Functions.
 *
 * If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef DNFTOLPB_HPP_
#define DNFTOLPB_HPP_

#include "bfr/ClauseSet.hpp"
#include "bfr/LPB.hpp"
#include "bfr/LPBConversionException.hpp"

namespace bfr {

/**
 * Interface for converting a DNF to an LPB.
 */
class DNFToLPB {
    public:
        /**
         * Destructor.
         */
        virtual ~DNFToLPB() { }

        /**
         * Convert a DNF to an LPB, if possible.
         *
         * Converts the given DNF to an LPB. Throws an
         * exception if this is not possible.
         */
        virtual LPB *convert(const ClauseSet *dnf)
            const throw (LPBConversionException) = 0;

    protected:
       /**
        * Default constructor.
        */
        DNFToLPB() { }

};

}


#endif  // DNFTOLPB_HPP_
